﻿using Sys.Core.Gen;
using Sys.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_gen_new_Edit : System.Web.UI.Page
{
    public GenNew model { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string id = Request.QueryString["id"];
            string did = Request.QueryString["did"];

            if (did == "Null") { did = string.Empty; }

            if (string.IsNullOrEmpty(id))
            {
                model = new GenNew();

                if (!string.IsNullOrEmpty(did))
                {
                    model.DictionaryID = did;
                }
                model.Top = false;
                model.Img = string.Empty;

            }
            else { model = NewBll.I.GetByKey(id); }
        }
    }
}